package rpc.proxy;

public class ProxyFactory {

    /**
     * @param cls
     * @return
     * @throws InstantiationException
     * @throws IllegalAccessException
     *             author zz.youpin.G_Y
     *             2018年4月16日
     *             说明:传入被代理的实体实现类型
     */
    public static <T> Object getProxyBean(Class<T> cls)
            throws InstantiationException, IllegalAccessException {
        T t = (T) cls.newInstance();
        Object proxyBean = new ProxyObject(t).getProxy();
        return proxyBean;
    }

}
